package com.zzyl.controller;

import com.zzyl.base.PageResponse;
import com.zzyl.base.ResponseResult;
import com.zzyl.service.NursingProjectService;
import com.zzyl.vo.NursingProjectVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/nursing_project")
@Api(value = "护理项目")
public class NursingProjectController extends BaseController{
    @Autowired
    NursingProjectService nursingProjectService;

    @GetMapping
    @ApiOperation(value = "分页查询护理项目")
    public ResponseResult<PageResponse<NursingProjectVo>>
    pageNursingProject(@ApiParam(value="项目护理名称") String name,
                       @ApiParam(value="状态") Integer status,
                       @ApiParam(value="当前页码") Integer pageNum,
                       @ApiParam(value="每页条数") Integer pageSize){
        PageResponse<NursingProjectVo> nursingProjectPageInfo = nursingProjectService.getByPage(name, status, pageNum, pageSize);
        return ResponseResult.success(nursingProjectPageInfo);
    }

}
